package com.yangzehan.workbench.service.impl;

import com.yangzehan.workbench.dao.ActivityRemarkdao;
import com.yangzehan.workbench.domain.ActivityRemark;
import com.yangzehan.workbench.service.ActivityRemarkService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service
public class ActivityRemarkServiceImpl implements ActivityRemarkService {
    @Resource
    private ActivityRemarkdao activityRemarkdao;

    @Override
    public List<ActivityRemark> getRemark(String id) {
       List<ActivityRemark> list= activityRemarkdao.getRemark(id);

       return list;
    }

    @Override
    public boolean delete(String id) {
       boolean n=false;
             int num=  activityRemarkdao.deleteRemark(id);
             if (num!=0){
                 n=true;
             }
        return n;
    }

    @Override
    public boolean savaRemark(ActivityRemark activityRemark) {


        int num=activityRemarkdao.savaRemark(activityRemark);
        if (num==1){

            return true;


        }
        return false;
    }

    @Override
    public boolean updateRemark(ActivityRemark activityRemark) {
        int num=activityRemarkdao.updateRemark(activityRemark);
        if (num!=0){

            return true;

        }
        return false;
    }
}
